<template>
	<view>
		<view class="head">
			<view class="ping_msg" @click="shower = true">
				清除评论
				<image src="../../static/users/clear2.png" mode=""></image>
			</view>
		</view>

		<u-action-sheet border-radius='30' @click="select" :list="list" v-model="shower"></u-action-sheet>


		<view :class="num==1?'title_res1 ji':'title_res1'" @click="jump(1)">
			评论我的
		</view>

		<view :class="num==2?'title_res2 ji':'title_res2'" @click="jump(2)">
			我评论的
		</view>

		<view class="p_me" v-if="num==1" v-for="(item,index) in 6">
			<image class="image1" src="../../static/users/hearer.png" mode=""></image>
			<view class="name">
				山海未眠
			</view>

			<view class="content">
				赞了这条视频
			</view>

			<view class="date">
				10-05 04:55
			</view>

			<image class="image2" src="../../static/users/jubao.png" mode="aspectFill"></image>

			<view class="content_2">
				回到了故乡，才发现这样的蓝天在大城市太难见到了，新
				鲜的空气，田野的空旷...我爱这里...
			</view>

			<view class="me" v-if="index%2==0">
				<image src="../../static/users/luntan.png" mode="aspectFill"></image>

				<view class="name_comment">
					@王二小
				</view>

				<view class="content_me">
					<text>#故乡的云# </text>
					回到了故乡才发现这样的蓝天在
					大城市太难见到了，新鲜的空气，田野的空
					旷...我爱这里...
				</view>
			</view>

			<view class="me_de" v-if="index%2!=0">
				<text class="text1">@王二小</text>
				<text class="text2">评论已被删除！</text>
			</view>
			<view class="ipt" @click="change">
				<view>回复他</view>
				<image class="biaoqing" src="../../static/users/biaoqing.png" mode=""></image>
			</view>

		</view>


		<view class="" v-if="num==2">

		</view>

		<view class="bottom"></view>

		<view class="shuru" v-if="show">
			<view class="ipt">
				<input cursor-spacing="30" maxlength="-1" auto-blur="true" focus="have" @blur="clear" value="" placeholder="" />
			</view>
			<view class="send">
				发送
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				num: 1,
				show: false,
				have: false,
				shower: false,
				list: [{
					text: '清空评论我的',
				}, {
					text: '清空我评论的'
				}, {
					text: '清空全部消息'
				}],
			}
		},
		methods: {
			jump(num) {
				console.log(11);
				this.num = num
			},
			change() {
				this.show = true
				this.have = true
			},
			clear() {
				this.show = false
			},
			back() {
				uni.redirectTo({
					url: "../message/message"
				})
			},
			select(index){
				console.log(index);
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F2F4FA;
		position: absolute;
	}

	.head {

		width: 750rpx;
		height: 84rpx;

		.icon {
			margin: 20rpx 0 0 20rpx;
		}

		.ping_msg {
			position: absolute;
			left: 326rpx;
			top: 24rpx;
			font-size: 32rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #181818;

			image {
				margin-left: 10rpx;
				width: 26rpx;
				height: 26rpx;
			}
		}
	}

	.bottom {
		width: 750rpx;
		height: 700rpx;
	}

	.title_res1 {
		margin: 20rpx 0 0 100rpx;
		width: 210rpx;
		height: 74rpx;
		border-radius: 37rpx;
		text-align: center;
		line-height: 74rpx;
	}

	.title_res2 {
		position: absolute;
		top: 104rpx;
		left: 440rpx;
		width: 210rpx;
		height: 74rpx;
		color: #666666;
		border-radius: 37rpx;
		text-align: center;
		line-height: 74rpx;
	}

	.ji {
		background: #181818;
		color: #fff;
	}

	.p_me {
		width: 750rpx;
		margin-top: 30rpx;
		padding: 0 30rpx 0 32rpx;
		display: flex;
		// height: 690rpx;
		flex-wrap: wrap;
		position: relative;
		border: 1rpx solid gray;
		border-radius: 30rpx 0 30rpx 0;

		// border-top: 1rpx solid gray;
		// border-bottom:1rpx solid gray ;
		.image1 {
			width: 80rpx;
			height: 80rpx;
		}

		.name {
			margin: 5rpx 0 0 21rpx;
			font-size: 28rpx;
			font-family: PingFang SC;
			font-weight: 400;
			color: #181818;
		}

		.content {
			margin: 5rpx 0 0 21rpx;
			font-size: 28rpx;
			font-family: PingFang SC;
			font-weight: 400;
			color: #666666;
		}

		.date {
			position: absolute;
			top: 47rpx;
			left: 130rpx;
			font-size: 22rpx;
			font-family: PingFang SC;
			font-weight: 300;
			color: #999999;
		}

		.image2 {
			position: absolute;
			width: 25rpx;
			height: 5rpx;
			right: 30rpx;
			top: 35rpx;
		}

		.content_2 {
			margin-left: 10rpx;
			margin-top: 30rpx;
			width: 649rpx;
			font-size: 26rpx;
			font-family: PingFang SC;
			font-weight: 300;
			color: #181818;
		}

		.me {
			padding: 30rpx;
			margin: 32rpx 0 30rpx 0rpx;
			width: 690rpx;
			height: 264rpx;
			background: #FFFFFF;
			border-radius: 40rpx;
			position: relative;

			image {
				width: 176rpx;
				height: 204rpx;
			}

			.name_comment {
				position: absolute;
				left: 226rpx;
				top: 60rpx;
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 400;
				color: #181818;
			}

			.content_me {
				position: absolute;
				left: 226rpx;
				bottom: 62rpx;
				width: 428rpx;
				font-size: 22rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #181818;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 3;
				overflow: hidden;

				text {
					font-family: PingFangSC-Medium;
					color: #181818;
					font-size: 22rpx;
					font-weight: 600;
				}
			}
		}

		.me_de {
			padding: 30rpx;
			margin: 32rpx 0 30rpx 0rpx;
			width: 690rpx;
			height: 104rpx;
			background: #FFFFFF;
			border-radius: 40rpx;

			.text1 {
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 400;
				color: #181818;
			}

			.text2 {
				margin-left: 21rpx;
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 600;
				color: #181818;
			}
		}

		.ipt {
			margin: 0 0 30rpx 0;
			padding: 0rpx 0 0rpx 40rpx;
			width: 616rpx;
			line-height: 74rpx;
			height: 74rpx;
			background: #fff;
			border-radius: 37rpx;
			position: relative;

			input {
				margin-left: 40rpx;
				width: 550rpx;
				height: 74rpx;
			}

			.biaoqing {
				position: absolute;
				right: -60rpx;
				bottom: 20rpx;
				width: 36rpx;
				height: 36rpx;
			}
		}

	}

	.shuru {
		// padding-bottom:20rpx;
		position: fixed;
		bottom: 0rpx;
		width: 750rpx;
		height: 120rpx;
		background: #F2F4FA;

		.ipt {
			margin: 20rpx 0 30rpx 30rpx;
			width: 570rpx;
			// height: 100rpx;
			background: #FFFFFF;
			border-radius: 50rpx;
			position: absolute;

			input {
				width: 540rpx;
				height: 80rpx;
				margin: 10rpx 0 0 20rpx;
			}
		}

		.image_one {
			position: absolute;
			right: 64rpx;
			top: 36rpx;
			width: 36rpx;
			height: 36rpx;
		}

		.image_two {
			position: absolute;
			right: 64rpx;
			top: 102rpx;
			width: 36rpx;
			height: 36rpx;
		}

		.send {
			position: absolute;
			top: 35rpx;
			right: 30rpx;
			width: 100rpx;
			height: 50rpx;
			background: #181818;
			border-radius: 10rpx;
			text-align: center;
			line-height: 50rpx;
			font-size: 26rpx;
			font-family: PingFang SC;
			font-weight: 400;
			color: #FFFFFF;
		}
	}
</style>
